﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmallJob.Data;
using SmallJob.Data.Interfaces;
using SmallJob.Model;
using SmallShop.Services.Interfaces;

namespace SmallShop.Services.Implements
{
    public class ManagerService : RepositoryBase<Manager>, IManagerService
    {
        public ManagerService(IDatabaseFactory DbFactory)
            : base(DbFactory)
        { }
        public Manager GetByEmail(string email)
        {
            return (from m in SmallJobDB.Managers
                    where m.IsLock == false && m.Email == email
                    select m).FirstOrDefault();
        }
    }
}
